﻿// Turtle Graphics
//===============================================================================
// Copyright 2009 Jason Hogg.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Dataflow;

namespace TurtleGraphics
{
    internal class BufferingErrorReporter : ErrorReporter
    {
        readonly List<ErrorInformation> errors = new List<ErrorInformation>();

        public IEnumerable<ErrorInformation> Errors
        {
            get
            {
                return this.errors;
            }
        }

        protected override void OnError(ErrorInformation errorInformation)
        {
            this.errors.Add(errorInformation);
        }
    }
}
